package com.weimei.conversionTreasure.weight;

import android.content.Context;
import android.widget.ImageView;
import android.widget.TextView;

import androidx.annotation.NonNull;

import com.lxj.xpopup.core.BottomPopupView;
import com.weigan.loopview.LoopView;
import com.weimei.conversionTreasure.R;
import com.weimei.conversionTreasure.utils.ValidateUtils;

import java.util.ArrayList;
import java.util.List;

import me.goldze.mvvmhabit.utils.ToastUtils;

public class BottomDelPop extends BottomPopupView {

    private Click mClick;
    private TextView sure;
    private ImageView cancel;
    public String txt;


    public interface Click{
        void click(String s);
    }

    public BottomDelPop(@NonNull Context context, Click click,String s) {
        super(context);
        this.mClick = click;
        txt = s;
    }

    @Override
    protected int getImplLayoutId() {
        return R.layout.layout_bottom_del;
    }

    @Override
    protected void onCreate() {
        cancel = findViewById(R.id.cancel);
        sure = findViewById(R.id.sure);
        sure.setText(txt);

        cancel.setOnClickListener(view -> dismiss());
        sure.setOnClickListener(view ->{
            mClick.click("");
            dismiss();
        });

    }



}
